package com.ushine.design.design.a_creative_mode.b_factory_method;

/**
 * 客户端
 *
 * @author yls
 */
public class Client {
    public static void main(String[] args) throws Exception {
//		logClient();
        //反射机制
        Class<?> class1 = Class.forName("java.lang.String");
        Object newInstance = class1.newInstance();
        System.out.println(newInstance.getClass());
    }

    private static void logClient() {
        LoggerFactory factory;
        Logger logger;
        factory = new DatabaseLoggerFactory();
        logger = factory.createLogger();
        logger.writeLog();
    }
}
